Repository navigation
Switch to ρ(z) for the penalties - #102
Merged
Merged
Conversation
Give the row reference log-scales (logref), the estimated plain Sinkhorn rate (μ2), the LSQR rotation diagonal (rdiag, rdiagbar), and the preconditioner ridge (ridge) descriptive names. Write the PowerMean penalty in the log slack as ρ (_powermean_ρ) and the augmented- Lagrangian per-entry term as ℓ. Assisted-by: Claude Opus 5.5 <noreply@anthropic.com>
Use ρ for the penalty argument and for the penalty in docstrings and comments across src/, ext/, and test/. The LSQR iteration keeps its own ϕ and ϕbar, which are unrelated to the penalty. Assisted-by: Claude Opus 5.5 <noreply@anthropic.com>
Built-in penalties are now functions of the log slack
z = log(a[i]*b[j]) - log|A[i,j]| instead of the ratio
r = |A[i,j]|/(a[i]*b[j]):
AbsLog{p}: ρ(z) = |z|^p
AbsLinear{p}: ρ(z) = |1 - exp(-z)|^p
PowerMean{p}: ρ(z) = (exp(-p z) - 1 + p z)/p
A user-defined AbstractCoverPenalty must likewise be callable on z.
cover_objective sums only over the nonzero entries of A and never
evaluates the penalty on a zero entry. A nonzero entry over a zero
scale product has z = -Inf, where every built-in penalty is infinite.
For AbsLinear, zero entries no longer add a constant 1 each, and the
Ipopt soft-cover models drop the same constant, so the objective they
report matches cover_objective.
Assisted-by: Claude Opus 5.5 <noreply@anthropic.com>
State the cover objective as a sum of ρ(z) over the nonzero entries of A, with z = log(a[i]*b[j]) - log|A[i,j]|, and name the AbsLog cases by their ℓ_p norms. Write the solver docstrings, the cover_transversal target objective, the documentation pages, and the README in the same terms. Assisted-by: Claude Opus 5.5 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #102 +/- ##
==========================================
- Coverage 98.34% 98.34% -0.01%
==========================================
Files 25 25
Lines 7550 7542 -8
==========================================
- Hits 7425 7417 -8
Misses 125 125 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This switches from a penalty on the coverage ratio
rto a penalty on the slacksz=-log(r). Given that it's convexity inzthat matters, this makes the theory a lot cleaner. Sadly, it's a breaking change for the package, and since 1.x is registered this ushers in v2, only a few days after v1 appeared.